package com.huitone.gddw.service.impl.monitoring.base;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huitone.gddw.dao.entity.WarnEventTrace;
import com.huitone.gddw.dao.monitoring.warn.IWarnEventTraceDao;
import com.huitone.gddw.service.monitoring.base.IWarnEventTraceService;
import com.huitone.gddw.utils.SysLoginUtil;

/**
 * 监控预警事件处理跟踪 接口实现类
 * @author wuluodan
 *
 */
@Service
public class WarnEventTraceService implements IWarnEventTraceService {

	@Autowired
	private IWarnEventTraceDao warnEventTraceDao;
	
	@Override
	public void save(WarnEventTrace entity) {
		entity.setDealTime(new Date());
		entity.setInsertTime(new Date());
		entity.setInsertStaffId(SysLoginUtil.getLoginUserId());
		entity.setLastModTime(entity.getInsertTime());
		entity.setLastModStaffId(entity.getInsertStaffId());
		warnEventTraceDao.save(entity);
	}

}
